package cz.zcu.fav.rat.rest.errorhandling;

import cz.zcu.fav.rat.rest.beans.ErrorMapping;

public class XmlRestErrorConverter implements RestErrorConverter<ErrorMapping>
{

	@Override
	public ErrorMapping convert(RestError re)
	{
		ErrorMapping mapping = new ErrorMapping();
		mapping.setStatus(re.getStatus());
		mapping.setCode(re.getCode());
		mapping.setDeveloperMessage(re.getDeveloperMessage());
		mapping.setMessage(re.getMessage());
		mapping.setMoreInfoUrl(re.getMoreInfoUrl());
		return mapping;
	}
}
